<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 146 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts146p0{position:absolute;left:106px;top:97px;}
 .ts146p1{position:absolute;left:352px;top:97px;}
 .ts146p3{position:absolute;left:665px;top:97px;}
 .ts146p7{position:absolute;left:106px;top:113px;}
 .ts146p8{position:absolute;left:706px;top:1026px;}
 .ts146p9{position:absolute;left:331px;top:1044px;}
 .ts146p13{position:absolute;left:106px;top:147px;}
 .ts146p14{position:absolute;left:106px;top:165px;}
 .ts146p16{position:absolute;left:106px;top:183px;}
 .ts146p18{position:absolute;left:106px;top:201px;}
 .ts146p20{position:absolute;left:106px;top:220px;}
 .ts146p22{position:absolute;left:106px;top:238px;}
 .ts146p25{position:absolute;left:106px;top:256px;}
 .ts146p27{position:absolute;left:106px;top:274px;}
 .ts146p29{position:absolute;left:106px;top:292px;}
 .ts146p31{position:absolute;left:106px;top:310px;}
 .ts146p32{position:absolute;left:106px;top:328px;}
 .ts146p34{position:absolute;left:106px;top:347px;}
 .ts146p35{position:absolute;left:106px;top:365px;}
 .ts146p36{position:absolute;left:106px;top:384px;}
 .ts146p38{position:absolute;left:106px;top:402px;}
 .ts146p39{position:absolute;left:106px;top:420px;}
 .ts146p40{position:absolute;left:106px;top:439px;}
 .ts146p42{position:absolute;left:106px;top:457px;}
 .ts146p44{position:absolute;left:106px;top:475px;}
 .ts146p45{position:absolute;left:106px;top:495px;}
 .ts146p47{position:absolute;left:106px;top:513px;}
 .ts146p49{position:absolute;left:106px;top:531px;}
 .ts146p51{position:absolute;left:106px;top:550px;}
 .ts146p52{position:absolute;left:106px;top:568px;}
 .ts146p53{position:absolute;left:106px;top:586px;}
 .ts146p55{position:absolute;left:106px;top:605px;}
 .ts146p57{position:absolute;left:106px;top:623px;}
 .ts146p58{position:absolute;left:106px;top:642px;}
 .ts146p59{position:absolute;left:106px;top:660px;}
 .ts146p62{position:absolute;left:106px;top:678px;}
 .ts146p63{position:absolute;left:106px;top:698px;}
 .ts146p64{position:absolute;left:106px;top:716px;}
 .ts146p66{position:absolute;left:106px;top:734px;}
 .ts146p67{position:absolute;left:106px;top:752px;}
 .ts146p69{position:absolute;left:106px;top:770px;}
 .ts146p70{position:absolute;left:106px;top:788px;}
 .ts146p72{position:absolute;left:106px;top:807px;}
 .ts146p75{position:absolute;left:106px;top:825px;}
 .ts146p77{position:absolute;left:106px;top:843px;}
 .ts146p79{position:absolute;left:106px;top:861px;}
 .ts146p81{position:absolute;left:106px;top:879px;}
 .ts146p83{position:absolute;left:106px;top:897px;}
 .ts146p84{position:absolute;left:106px;top:915px;}
 .ts146p86{position:absolute;left:106px;top:934px;}
 .ts146p87{position:absolute;left:106px;top:952px;}
 .ts146p88{position:absolute;left:106px;top:971px;}
 .ts146p90{position:absolute;left:106px;top:989px;}

 /* Font Styles */
 .ft0p146{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p146{font-weight:normal;}
 .ft2p146{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p146{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p146{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p146{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}
 .ft6p146{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground146{position:absolute;left:97px;top:145px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index145.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;146 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index147.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground146><img src="./background146.png" width="633" height="910" border="0" alt=""></div>
<div class=ts146p0><span class="ft0p146"> </span></div>
<div class=ts146p1><span class="ft0p146">Gravitybox Schedule Primer<span class="ft1p146"> </span></span></div>
<div class=ts146p3><span class="ft0p146">Page 144&nbsp; </span></div>
<div class=ts146p7><span class="ft2p146"> </span></div>
<div class=ts146p8><span class="ft3p146"> </span></div>
<div class=ts146p9><span class="ft4p146">1998&#45;2004 Gravitybox Software LLC<span class="ft3p146"> </span></span></div>
<div class=ts146p13><span class="ft5p146"> </span></div>
<div class=ts146p14><span class="ft5p146">&nbsp; oPrinterParameter.PrinterDeviceName = Printer.DeviceName </span></div>
<div class=ts146p16><span class="ft5p146">&nbsp; PrintFile = Schedule1.GoPrint(1, _ </span></div>
<div class=ts146p18><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Schedule1.Rooms.Count, _ </span></div>
<div class=ts146p20><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Schedule1.StartTime, _ </span></div>
<div class=ts146p22><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateAdd(&#34;h&#34;, Schedule1.DayLength, _ </span></div>
<div class=ts146p25><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Schedule1.StartTime), _ </span></div>
<div class=ts146p27><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oPrinterParameter) </span></div>
<div class=ts146p29><span class="ft5p146">&nbsp; Set oPrinterParameter = Nothing </span></div>
<div class=ts146p31><span class="ft5p146"> </span></div>
<div class=ts146p32><span class="ft5p146">End Function </span></div>
<div class=ts146p34><span class="ft6p146"> </span></div>
<div class=ts146p35><span class="ft6p146">Next we need to a property to the child form called &#147;Changed&#148;. This is a Boolean </span></div>
<div class=ts146p36><span class="ft6p146">property that will keep up with the changed state of the schedule. When true, it means </span></div>
<div class=ts146p38><span class="ft6p146">that the schedule needs to be saved to file. After loading and saving this property is set </span></div>
<div class=ts146p39><span class="ft6p146">to false, because there is nothing that has changed since the last save. In the </span></div>
<div class=ts146p40><span class="ft6p146">schedule&#146;s events that signify change we will set this variable to true as in the following </span></div>
<div class=ts146p42><span class="ft6p146">code. </span></div>
<div class=ts146p44><span class="ft6p146"> </span></div>
<div class=ts146p45><span class="ft5p146">Private Sub Schedule1_AfterAdd(ByVal NewIndex As Long) </span></div>
<div class=ts146p47><span class="ft5p146"> Changed = True </span></div>
<div class=ts146p49><span class="ft5p146">End Sub </span></div>
<div class=ts146p51><span class="ft6p146"> </span></div>
<div class=ts146p52><span class="ft6p146">The events that need this line of code include: AfterAdd, AfterCopy, AfterDelete, </span></div>
<div class=ts146p53><span class="ft6p146">AfterDragFromFile, AfterEdit, AfterEditNotes, AfterEditText, and AfterMove. If any one </span></div>
<div class=ts146p55><span class="ft6p146">of these events is raised the schedule will need to be saved.&nbsp; </span></div>
<div class=ts146p57><span class="ft6p146"> </span></div>
<div class=ts146p58><span class="ft6p146">If the user presses the child window close button, how will the schedule know to save? </span></div>
<div class=ts146p59><span class="ft6p146">In the Form_QueryUnload event we will add code to catch this situation. </span></div>
<div class=ts146p62><span class="ft6p146"> </span></div>
<div class=ts146p63><span class="ft5p146">Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As </span></div>
<div class=ts146p64><span class="ft5p146">Integer) </span></div>
<div class=ts146p66><span class="ft5p146"> </span></div>
<div class=ts146p67><span class="ft5p146">&nbsp; If Changed Then </span></div>
<div class=ts146p69><span class="ft5p146">&nbsp;&nbsp;&nbsp; Select Case MsgBox(&#34;This schedule has been modified. Do you </span></div>
<div class=ts146p70><span class="ft5p146">wish to save?&#34;, vbYesNoCancel + vbQuestion, &#34;Save?&#34;) </span></div>
<div class=ts146p72><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case vbYes: Call SaveFile </span></div>
<div class=ts146p75><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case vbNo: 'Do Nothing </span></div>
<div class=ts146p77><span class="ft5p146">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case vbCancel: Cancel = True </span></div>
<div class=ts146p79><span class="ft5p146">&nbsp;&nbsp;&nbsp; End Select </span></div>
<div class=ts146p81><span class="ft5p146">&nbsp; End If </span></div>
<div class=ts146p83><span class="ft5p146"> </span></div>
<div class=ts146p84><span class="ft5p146">End Sub </span></div>
<div class=ts146p86><span class="ft6p146"> </span></div>
<div class=ts146p87><span class="ft6p146">If the &#147;Changed&#148; variable is set we will prompt the user to save the form. The user may </span></div>
<div class=ts146p88><span class="ft6p146">then choose &#147;Yes&#148; to save and unload, &#147;No&#148; to not save and unload, or &#147;Cancel&#148; to not </span></div>
<div class=ts146p90><span class="ft6p146">save and cancel the unload of the window all together. </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
